import { RouteRecordRaw } from 'vue-router';
import { Layout } from '@/router/constant';
import { FieldTimeOutlined } from '@vicons/antd';
import { renderIcon } from '@/utils/index';

const routes: Array<RouteRecordRaw> = [
  {
    path: '/attendance',
    name: 'Attendance',
    redirect: '/attendance/list',
    component: Layout,
    meta: {
      title: '考勤管理',
      icon: renderIcon(FieldTimeOutlined),
      sort: 6,
    },
    children: [
      {
        path: 'attendance',
        name: 'attendance-list',
        meta: {
          title: '考勤报表',
        },
        component: () => import('@/views/labor/basicList/attendance.vue'),
      },
      {
        path: 'group',
        name: 'attendance-group',
        meta: {
          title: '考勤组管理',
        },
        component: () => import('@/views/labor/basicList/index.vue'),
      },
      {
        path: 'classes',
        name: 'attendance-classes',
        meta: {
          title: '班次管理',
        },
        component: () => import('@/views/labor/basicList/month_attendance.vue'),
      },
    ],
  },
];

export default routes;
